<?php

$user = $_POST;

$user['ctime'] = time();

$user['password'] = md5($user['password']);


$oldArr = file_get_contents("./data/user.txt");

$oldArr = json_decode($oldArr,true);

$oldArr[] = $user;

$str = json_encode($oldArr);

file_put_contents("./data/user.txt",$str);

header("Location:./login.php");
